<?php
namespace app\tools\controller;
use app\tools\logic\ApiLogic;
use app\tools\logic\MemberLogic;
class Member extends Base{
    //获取列表
    function getList(){
     	$data = MemberLogic::getList();
		return ApiLogic::return(0,'',$data);
    }

    function getInfo(){
    	$info = MemberLogic::getInfo();
		return ApiLogic::return(0,'',$info);
    }

    function upPassword(){
    	$rs = MemberLogic::upPassword();
		return ApiLogic::return($rs);
    }

    function upApiKey(){
    	$rs = MemberLogic::upApiKey();
		return ApiLogic::return($rs);
    }
    
    function delete(){
    	$rs = MemberLogic::delete();
		if($rs){
			return ApiLogic::return($rs);
		}else{
			return ApiLogic::return(0);
		}
    }

	#--------------------------------------------
	function getGradeList(){
		$data = MemberLogic::getGradeList();
		return ApiLogic::return(0,'',$data);
	}
	function gradeGetInfo(){
		$info = MemberLogic::gradeGetInfo();
		return ApiLogic::return(0,'',$info);
	}
	function gradeAdd(){
		$rs = MemberLogic::gradeAdd();
		if($rs){
			return ApiLogic::return($rs);
		}else{
			return ApiLogic::return(0);
		}
	}
	function gradeSave(){
		$rs = MemberLogic::gradeSave();
		if($rs){
			return ApiLogic::return($rs);
		}else{
			return ApiLogic::return(0);
		}
	}
	function gradeDelete(){
		$rs = MemberLogic::gradeDelete();
		if($rs){
			return ApiLogic::return($rs);
		}else{
			return ApiLogic::return(0);
		}
	}
}
